package com.mf.springboot.backend.userAuth.service.role;

import com.mf.springboot.backend.mybatisModule.entity.roles.TSysRoles;
import com.mf.springboot.backend.mybatisModule.entity.roles.TSysRolesExample;
import com.mf.springboot.backend.mybatisModule.mapper.TSysRolesMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Created by java_jony on 2017/9/19.
 */
@Service
public class RolesService {

    @Resource
    private TSysRolesMapper rolesMapper;

    public int deleteByPrimaryKey(String id) {
        return rolesMapper.deleteByPrimaryKey(id);
    }

    public int insert(TSysRoles record) {
        return rolesMapper.insert(record);
    }


    public List<TSysRoles> getList(Map map) {
        TSysRolesExample example = new TSysRolesExample();
        return rolesMapper.selectByExample(example);
    }

    public TSysRoles selectByPrimaryKey(String id) {
        return rolesMapper.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKey(TSysRoles record) {
        return rolesMapper.updateByPrimaryKey(record);
    }
}
